home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2007 September / PCWSEP07.iso / Software / Linux / Linux Mint 3.0 Light / LinuxMint-3.0-Light.iso / casper / filesystem.squashfs / etc / init.d / xserver-xorg-input-wacom < prev   
Encoding:
Text File  |  2007-04-02  |  486 b   |  29 lines

  1. #!/bin/bash
  2.  
  3. . /lib/lsb/init-functions
  4.  
  5. if [ ! -d /sys/bus/pnp/devices ]; then exit; fi
  6.  
  7. cd /sys/bus/pnp/devices
  8.  
  9. case $1 in
  10.     start|restart|reload|force-reload)
  11.     log_begin_msg "Doing Wacom setup..."
  12.     for x in *; do
  13.     PORT=unknown;
  14.     for y in `cat $x/id`; do
  15.         case "$y" in
  16.         WACf006*|WACf005*|WACf004*)
  17.         PORT=/dev/`echo $x/tty:* | awk -F: '{print $3}'`
  18.         ln -sf $PORT /dev/input/wacom
  19.         ;;
  20.         esac
  21.     done
  22.     done
  23.     log_end_msg 0;
  24.     ;;
  25.     stop)
  26.     exit 0;
  27.     ;;
  28. esac
  29.